package com.hyh.service;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ToolsService {

    @Autowired
    private TicketService ticketService;


    @Tool(description = "退票")
    public String cancel(
            @ToolParam(description = "退票编号") String ticketId,
            @ToolParam(description = "姓名") String name
    ){
        ticketService.cancel(ticketId,name);
        return "退票成功";
    }
}
